﻿/// <summary>
/// Author: Le Van Binh
/// Date: 2013/06/06
/// </summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Threading;
using System.Globalization;
using Ivs.Core.Common.Utilities;

namespace SketchTour
{
    public class HomeController : BaseController
    {
        #region Public Const
        // Set language is English
        public const string m_English = "en-US";
        //Set language is Japanese
        public const string m_Japanese = "ja-JP";
        #endregion

        #region Action Result Method
        public ActionResult Index()
        {
            //Create list data for dropdownlist
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            dictionary.Add(m_English, "English");
            dictionary.Add(m_Japanese, "Japanese");
            //Set default language when page is loading
            if (Utilities.parseInt(Session["CurrentCulture"]) == 1)
            {
                //Set Japanese language in case japanese
                // Set the thread's CurrentCulture the same as CurrentUICulture.
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(m_Japanese);
                ViewBag.ddpLanguage = new SelectList(dictionary, "Key", "Value", Session["Language"].ToString());
            }
            else
            {
                ViewBag.ddpLanguage = new SelectList(dictionary, "Key", "Value", m_English);
                // Set the thread's CurrentCulture the same as CurrentUICulture.
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(m_English);
            }
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public ActionResult CategoryMenu()
        {
            //string[,] menus = new string[,] { {"menu 1", "0"}, {"menu 2", "1"}, {"menu", "1"}, {"menu 4", "1"} };
            List<string[]> list = new List<string[]>();
            list.Add(new string[] { "Home", "0" });
            list.Add(new string[] { "User Management", "1", "Management", "MSUS00" });
            list.Add(new string[] { "Role Management", "1", "Index", "MSRM00" });
            list.Add(new string[] { "Master Data", "0" });
            list.Add(new string[] { "Hotel - Restaurant Management", "1", "Index", "MSHT00" });
            //list.Add(new string[] { "Meal Management", "1", "Index", "MSML00" });
            //list.Add(new string[] { "Guide Management", "1", "Index", "MSGD00" });
            list.Add(new string[] { "Vehicle Management", "1", "Index", "MSVH00" });
            //list.Add(new string[] { "Air Management", "1", "Index", "MSAR00" });
            //list.Add(new string[] { "Train Management", "1", "Index", "MSTR00" });
            list.Add(new string[] { "Staff Management", "1", "Index", "MSST00" });
            list.Add(new string[] { "Golf Management", "1", "Index", "MSGF00" });
            list.Add(new string[] { "Currency Management", "1", "Index", "MSCR00" });
            list.Add(new string[] { "Destination Management", "1", "Index", "MSDT00" });
            list.Add(new string[] { "Passenger Management", "1", "Index", "MSPS00" });
            list.Add(new string[] { "Tour", "0" });
            list.Add(new string[] { "Tour Management", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Accounting", "0" });
            list.Add(new string[] { "Accounting Management", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Reports - Statistics", "0" });
            list.Add(new string[] { "New Arriving Tour Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Next Departure Tour Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "New Daily Booking Tour Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Cancellation Tour Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "V.A.T Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Hotel Booking Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Hotel/Room Night Report", "1", "Index", "TMCT00" });
            list.Add(new string[] { "Gross/Net Income Statistics", "1", "Index", "TMCT00" });
            return PartialView(list);
        }

        #endregion
    }
}
